package modellayer;

import java.util.ArrayList;

/**
 * The KeyPerson class to create KeyPerson objects
 * @author Allan Eriksen, Andreas Rye, Casper Madsen, Christian Stidsborg, Stefan Bols
 */

public class KeyPerson
{
	private int keyPersonId;
	private String name;
	private String address;
	private ZipCode zipCode;
	private String phone;
	private String mail;
	private String interests;
	private JobPosition jobPosition;
	private long addedDate;
	private ArrayList<Company> cList;
	private boolean isDummy;
	
	/**
	 * @param keyPersonId
	 * @param name
	 * @param address
	 * @param zipCode
	 * @param phone
	 * @param mail
	 * @param interests
	 * @param jobPosition
	 * @param addedDate
	 * @param cList
	 * @param isDummy
	 */
	
	/**
	 * Constructor for the KeyPerson class
	 */
	public KeyPerson(int keyPersonId, String name, String address, ZipCode zipCode, String phone, String mail, String interests, JobPosition jobPosition, long addedDate)
	{
		this.keyPersonId = keyPersonId;
		this.name = name;
		this.address = address;
		this.zipCode = zipCode;
		this.phone = phone;
		this.mail = mail;
		this.interests = interests;
		this.jobPosition = jobPosition;
		this.addedDate = addedDate;
		cList = new ArrayList<Company>();
		this.isDummy = false;
	}
	
	/**
	 * KeyPerson dummy for the Database layer
	 * @param keyPersonId
	 */
	public KeyPerson(int keyPersonId)
	{
		this.keyPersonId = keyPersonId;
		this.isDummy = true;
	}
	
	/**
	 * Set method for the cList ArrayList
	 * @param cList
	 */
	public void setcList(ArrayList<Company> cList)
	{
		this.cList = cList;
	}
	
	/**
	 * Get method for the isDummy
	 * @return isDummy
	 */
	public boolean getIsDummy()
	{
		return this.isDummy;
	}
	
	/**
	 * Add method for the cList ArrayList
	 * @param c
	 */
	public void addCompany(Company c)
	{
		this.cList.add(c);
	}
	
	/**
	 * Get method for the cList ArrayList
	 * @return cList
	 */
	public ArrayList<Company> getCompanyList()
	{
		return this.cList;
	}
	
	/**
	 * Get method for the zipCode
	 * @return zipCode
	 */
	public ZipCode getZipCode()
	{
		return this.zipCode;
	}
	
	/**
	 * Set method for the zipCode
	 * @param zipCode
	 */
	public void setZipCode(ZipCode zipCode)
	{
		this.zipCode = zipCode;
	}

	/**
	 * Get method for the KeyPersonId
	 * @return keyPersonId
	 */
	public int getKeyPersonId()
	{
		return this.keyPersonId;
	}

	/**
	 * Set method for the keyPersonId
	 * @param keyPersonId
	 */
	public void setKeyPersonId(int keyPersonId)
	{
		this.keyPersonId = keyPersonId;
	}

	/**
	 * Get method for the name
	 * @return name
	 */
	public String getName()
	{
		return this.name;
	}

	/**
	 * Set method for the name
	 * @param name
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * Get method for the address
	 * @return address
	 */
	public String getAddress()
	{
		return this.address;
	}

	/**
	 * Set method for the address
	 * @param address
	 */
	public void setAddress(String address)
	{
		this.address = address;
	}

	
	/**
	 * Get method for the phone
	 * @return phone
	 */
	public String getPhone()
	{
		return this.phone;
	}

	/**
	 * Set methof ro the phone
	 * @param phone
	 */
	public void setPhone(String phone)
	{
		this.phone = phone;
	}

	/**
	 * Get method for the mail
	 * @return mail
	 */
	public String getMail()
	{
		return this.mail;
	}

	/**
	 * Set method for the mail
	 * @param mail
	 */
	public void setMail(String mail)
	{
		this.mail = mail;
	}

	/**
	 * Get method for the interests
	 * @return interests
	 */
	public String getInterests()
	{
		return this.interests;
	}

	/**
	 * Set method for the interests
	 * @param interests
	 */
	public void setInterests(String interests)
	{
		this.interests = interests;
	}

	/**
	 * Get method for the JobPosition
	 * @return jobPosition
	 */
	public JobPosition getJobPosition()
	{
		return this.jobPosition;
	}

	/**
	 * Set method for the jobPosition
	 * @param jobPosition
	 */
	public void setJobPosition(JobPosition jobPosition)
	{
		this.jobPosition = jobPosition;
	}
	
	/**
	 * Get method for the addedDate
	 * @return addedDate
	 */
	public long getAddedDate()
	{
		return this.addedDate;
	}

	/**
	 * Set method for the addedDate
	 * @param addedDate
	 */
	public void setAddedDate(long addedDate)
	{
		this.addedDate = addedDate;
	}
	
	/**
	 * toString method, converts name to a string
	 * @return name
	 */
	@Override
    public String toString() {
        return this.name;
    }
	
}
